# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusion do
  @moduledoc """


  ## Attributes

  *   `requestCookiesToExclude` (*type:* `list(GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t)`, *default:* `nil`) - A list of request cookie names whose value will be excluded from inspection during preconfigured WAF evaluation.
  *   `requestHeadersToExclude` (*type:* `list(GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t)`, *default:* `nil`) - A list of request header names whose value will be excluded from inspection during preconfigured WAF evaluation.
  *   `requestQueryParamsToExclude` (*type:* `list(GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t)`, *default:* `nil`) - A list of request query parameter names whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body.
  *   `requestUrisToExclude` (*type:* `list(GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t)`, *default:* `nil`) - A list of request URIs from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded.
  *   `targetRuleIds` (*type:* `list(String.t)`, *default:* `nil`) - A list of target rule IDs under the WAF rule set to apply the preconfigured WAF exclusion. If omitted, it refers to all the rule IDs under the WAF rule set.
  *   `targetRuleSet` (*type:* `String.t`, *default:* `nil`) - Target WAF rule set to apply the preconfigured WAF exclusion.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :requestCookiesToExclude =>
            list(
              GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t()
            )
            | nil,
          :requestHeadersToExclude =>
            list(
              GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t()
            )
            | nil,
          :requestQueryParamsToExclude =>
            list(
              GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t()
            )
            | nil,
          :requestUrisToExclude =>
            list(
              GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams.t()
            )
            | nil,
          :targetRuleIds => list(String.t()) | nil,
          :targetRuleSet => String.t() | nil
        }

  field(:requestCookiesToExclude,
    as: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams,
    type: :list
  )

  field(:requestHeadersToExclude,
    as: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams,
    type: :list
  )

  field(:requestQueryParamsToExclude,
    as: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams,
    type: :list
  )

  field(:requestUrisToExclude,
    as: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams,
    type: :list
  )

  field(:targetRuleIds, type: :list)
  field(:targetRuleSet)
end

defimpl Poison.Decoder,
  for: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusion do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusion.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.Compute.V1.Model.SecurityPolicyRulePreconfiguredWafConfigExclusion do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
